//
// Copyright (c) 2024 BPer
//

#ifndef SRC_BPERRTC_BPERDATACHANNEL_H_
#define SRC_BPERRTC_BPERDATACHANNEL_H_
#include <bperutil/BPerType.h>
#include <bperrtc/BPerRtcContextH.h>
#if BPer_Enable_Datachannel
typedef struct{
	void *context;
	void (*on_message)(void *context,char* data,int32_t nb);
	void (*send_message)(void *context,BPerFrame* msgFrame);
}BPerDatachannel;

void bPer_create_datachannel(BPerDatachannel *datachannel,BPerRtcContext* ctx);
void bPer_destroy_datachannel(BPerDatachannel *datachannel);
#endif
#endif /* SRC_BPERRTC_BPERDATACHANNEL_H_ */
